package cn.edu.sjtu.stap.sdg;

import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding;

public class SdgFormalParameter extends SdgNode {

    private static final long serialVersionUID = 1L;

    private Argument parameter;

    private AbstractMethodDeclaration methodDeclaration;

    public SdgFormalParameter(SdgNodeKind kind) {
        super(kind);
    }

    public Argument getParameter() {
        return parameter;
    }

    public void setParameter(Argument parameter) {
        this.parameter = parameter;
    }

    public AbstractMethodDeclaration getMethodDeclaration() {
        return methodDeclaration;
    }

    public void setMethodDeclaration(AbstractMethodDeclaration methodDeclaration) {
        this.methodDeclaration = methodDeclaration;
    }

    @Override
    public String toString() {
        StringBuffer s = new StringBuffer();
        s.append("(Sdg Node Id: ");
        s.append(this.getId());
        s.append(", Source Location: ");
        s.append(this.getCfgNode() == null ? null : this.getCfgNode()
                .getLocationInfo());
        s.append(", Name: ");
        s.append(this.getName());
        s.append(", Content: ");
        if (parameter != null) {
            
            
        }else s.append(" null ");
        s.append(")\n");
        return s.toString();
    }
}
